//
//  VipProfileView.swift
//  Meboo
//
//  Created by kyo on 2024/4/12.
//

import UIKit

class VipProfileView: UIView {

    override init(frame: CGRect) {
        super.init(frame: frame)
        makeUI()
    }
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
    }
    
    
    
    
    // MARK:  - Private Method
//    func resetRootView() {
//        let appDelegate = UIApplication.shared.delegate as? AppDelegate
//        if account != nil {
//            appDelegate?.window?.rootViewController = BaseTabBarViewController.init()
//        } else {
//            appDelegate?.window?.rootViewController = BaseNavViewController.init(rootViewController: KLLoginViewController.init())
//        }
//    }
    
    // MARK:  - UI
    private func makeUI() {
//        self.addSubview(lottieView)
    }
    
    
    // MARK:  - Setter && Getter
    /// lottieView
//    lazy var lottieView: LottieAnimationView = {
//        let view = LottieAnimationView.init(frame: self.view.bounds)
//        view.loopMode = .playOnce
//        view.contentMode = .scaleAspectFill
//        view.animation = animation
//        view.play { completed in
//            view.removeFromSuperview()
//            if completed {
//                self.resetRootView()
//            }
//        }
//        return view
//    }()
//    - (UIButton *)resumeBtn {
//        if (!_resumeBtn) {
//            _resumeBtn = [[UIButton alloc] init];
//            _resumeBtn.titleLabel.font = MBFontSizeScale(7);
//            [_resumeBtn setTitleColor:HEXS(@"000000") forState:0];
//            [_resumeBtn setTitle:@"restore purchase" forState:0];
//    //        [_resumeBtn addTarget:self action:@selector(resumeAction) forControlEvents:UIControlEventTouchUpInside];
//        }
//        return _resumeBtn;
//    }
    ///animation
    lazy var resumeBtn: UIButton = {
        let  button = UIButton.init()
        button.setTitleColor(.white, for: .normal)
        button.titleLabel?.font = UIFont.systemFont(ofSize: 9);
        return button
    }()
    
    ///animation
    lazy var account: MBUserAccount? = {
        let  account = MBUserAccount.default()
        return account
    }()
    
}
